﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_UserManagement : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            loadCustomer();
        }
    }
    private void loadCustomer()
    {
        ChoDienTuDataContext cdt = new ChoDienTuDataContext();
        grvUser.DataSource = cdt.Select_AllCustomer();
        grvUser.DataBind();
    }
    protected void grvUser_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        ChoDienTuDataContext cdt = new ChoDienTuDataContext();
        grvUser.DataSource = cdt.Select_AllCustomer();
        grvUser.PageIndex = e.NewPageIndex; 
        grvUser.DataBind();
    }
}